﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ClientCollectorAssignmentCtrl.ascx.cs" 
Inherits="WebApplication.Finance.Controls.ClientCollectorAssignmentCtrl" %>

<style type="text/css">
.noMaxStyle
{
	font-family: Verdana;
	font-style: italic;
	font-size: 8pt;
	font-weight: bold;	
	padding-left: 8px;
}
</style>

<asp:UpdatePanel ID="updatePanel1" runat="server" UpdateMode="Always">
<ContentTemplate>
<div style="margin:auto; margin-top:10px; width:720px;">
		<asp:GridView ID="gridAssignments" runat="server" AutoGenerateColumns="False" 
			HorizontalAlign="Center" DataKeyNames="ClientCollectorAssignmentId" 
			GridLines="None" BorderStyle="None" CellPadding="4"
			Font-Names="Verdana" onrowdatabound="gridAssignments_RowDataBound" 
			onrowcommand="gridAssignments_RowCommand">
		<Columns>
			<asp:TemplateField HeaderText="Collector">
				<ItemTemplate>
					<asp:DropDownList ID="cboCollector" Width="164px" runat="server"></asp:DropDownList>
				</ItemTemplate>
			</asp:TemplateField>
			<asp:TemplateField HeaderText="From">
				<HeaderStyle HorizontalAlign="Center" />
				<ItemTemplate>
					&nbsp;&nbsp;<asp:TextBox ID="txtMinimum" CssClass="rightAlign" Width="74px" runat="server"></asp:TextBox>
				</ItemTemplate>
			</asp:TemplateField>
			<asp:TemplateField HeaderText="To">
				<HeaderStyle HorizontalAlign="Center" Width="100px" />
				<ItemTemplate><table cellpadding="0" cellspacing="0">
						<tr>
							<td><asp:CheckBox ID="chkMaximum" runat="server" OnCheckedChanged="onSetupControlsEvent" AutoPostBack="True" /></td>
							<td><asp:TextBox ID="txtMaximum" CssClass="rightAlign" Width="74px" runat="server"></asp:TextBox>
								<asp:Panel ID="pnlMaximum" runat="server" CssClass="noMaxStyle" >No Limit</asp:Panel>
							</td>
						</tr>
					</table>
				</ItemTemplate>
			</asp:TemplateField>
			<asp:BoundField DataField="ModifiedAsText" HeaderText="Modified" >
				<HeaderStyle Width="100px" HorizontalAlign="Left" />
				<ItemStyle HorizontalAlign="Left" Font-Size="10px" Width="100px" Wrap="true" />
			</asp:BoundField>
			<asp:ButtonField ButtonType="Button" Text="Delete..." CommandName="DeleteAssignment" />
		</Columns>
		<HeaderStyle Font-Size="12pt" Font-Bold="True" Font-Names="Arial"  HorizontalAlign="Left" />
		<RowStyle Font-Size="11pt" Font-Bold="False" Font-Names="Arial" CssClass="UnderlineBorder" />
		<EmptyDataTemplate>
			<asp:Label ID="Label1" runat="server" Text="There are no collector assignments."></asp:Label><br />
			<asp:Label ID="Label2" runat="server" CssClass="Instructions" Text="Use the boxes below to add a new collector assignment."></asp:Label>
		</EmptyDataTemplate>
		</asp:GridView>	
</div>

<asp:Panel runat="server" ID="pnlAddAlert">
<div style="margin:auto; margin-top:10px; width:720px;">
<table border="0" style="padding-left:78px;">
	<tr>
		<td style="width:177px;"><asp:DropDownList ID="cboNewCollector" runat="server" style="width:166px;"></asp:DropDownList></td>
		<td style="width:84px;"><asp:TextBox ID="txtNewMinimum" CssClass="rightAlign" Width="74px" Text="0.00" runat="server"></asp:TextBox></td>
		<td nowrap="nowrap" style="width:204px;">
			<table cellpadding="0" cellspacing="0">
				<tr>
					<td><asp:CheckBox ID="chkNewMaximum" runat="server" Checked="true" 
							AutoPostBack="True" oncheckedchanged="onSetupControlsEvent" /></td>
					<td><asp:TextBox ID="txtNewMaximum" CssClass="rightAlign" Width="74px" Text="10000.00" runat="server"></asp:TextBox>
					<asp:Panel ID="pnlNewMaximum" runat="server" CssClass="noMaxStyle" >No Limit</asp:Panel>
					</td>
				</tr>			
			</table>			
			</td>
		<td style="width:100px;">&nbsp;&nbsp;<asp:Button ID="butAdd" runat="server" Text="Add" onclick="butAdd_Click" /></td>
	</tr>
</table>
</div>
</asp:Panel>

</ContentTemplate>
</asp:UpdatePanel>

